﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations.Schema;

namespace WaterRevenueMS.Componnent.Data.Mapping.Customer
{
    partial class CustomerMap
    {
        partial void CustomerMapAppend()
        {
            this.HasKey(t => t.Id);
            this.Property(t => t.Yong_HBH)
                .HasMaxLength(16);
            this.Property(t => t.Yong_HZZ)
                .HasMaxLength(128);
            this.Property(t => t.Zhu_FMJ)
                .HasMaxLength(32);
            this.Property(t => t.Hu_ZXM)
                .HasMaxLength(16);
            this.Property(t => t.Hu_ZXB)
                .HasMaxLength(8);
            this.Property(t => t.Lian_XDH)
                .HasMaxLength(32);
            this.Property(t => t.Shen_FZH)
                .HasMaxLength(32);
            this.Property(t => t.Jia_TCY)
                .HasMaxLength(32);
            this.Property(t => t.Gong_ZDW)
                .HasMaxLength(64);
            this.Property(t => t.Yin_HZH)
                .HasMaxLength(32);
            this.Property(t => t.Zhang_HZT)
                .HasMaxLength(16);

            this.ToTable("Bsc_Yong_HSZ");
            this.Property(t => t.Id).HasColumnName("Yong_HSZ_ID")
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            this.HasOptional(t => t.BankSet).WithMany(d => d.Customer).HasForeignKey(t => t.Yin_HSZ_No);//银行编号

            this.HasOptional(t => t.MeterBook).WithMany(d => d.Customer).HasForeignKey(t => t.Biao_CSZ_No);//表册ID

        }
    }
}
